﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SGDemo.OA.Service.Interface;
using SGRapidForm.Common;
using DevExpress.Web.ASPxGridView;
using SGDemo.OA.Entity;

namespace SGDemo.Web.OA
{
    public partial class NewsList : System.Web.UI.Page
    {
        private IOAService _oaService = ServiceProxyFactory.Create<IOAService>("oaservice");

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 自定义GridView回调重新绑定
        /// </summary>
        protected void gvwList_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
        {
            gvwList.PageIndex = 0;
            gvwList.DataBind();
            gvwList.Selection.UnselectAll();
        }

        public int News_PagingGetCount(string filterConditions)
        {
            return _oaService.News_PagingGetCount(filterConditions);
        }

        public List<NewsENT> News_PagingGet(int startRecord, int maxRecords, string sortColumns, string filterConditions)
        {
            return _oaService.News_PagingGet(startRecord, maxRecords, sortColumns, filterConditions);
        }
    }
}